Open
Conversation
Extend agent detection to recognise OpenAI Codex CLI alongside the existing Claude Code integration. This ensures Codex-assisted commits are properly attributed and session context is preserved. - Add internal/agent/codex/ package with Detector, process detection via pgrep, and session directory discovery (~/.codex/) - Add resolveDetector() in hooks to select detector based on config - Update pre-commit and post-commit hooks to use the resolver, with Claude-specific session parsing guarded behind type assertions - Wire up PARTIO_AGENT env var in config (was documented but missing) - Table-driven tests for interface compliance, pgrep output parsing, and session directory discovery Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 7b4ba254c30e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
internal/agent/codex/package withDetectorimplementation, process detection (pgrep -f codex), and session directory discovery (~/.codex/)resolveDetector()in the hooks package, selecting the detector based on theAgentconfig fieldclaude.New(), with Claude-specific session parsing (JSONL, plans) guarded behind type assertionsPARTIO_AGENTenvironment variable in config (was documented in CLAUDE.md but not implemented inenv.go)Test plan
make testpasses — new table-driven tests for interface compliance, pgrep output parsing, and session directory discoverymake lintpasses — zero issuesPARTIO_AGENT=codex, run codex, commit — verify checkpoint is created withagent: codex🤖 Generated with Claude Code